﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RelatorioArtigo.aspx.cs"
    Inherits="Avaliador_RelatorioAvaliador" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
    <script src="../scripts/querystring-0.9.0-min.js" type="text/javascript"></script>
    <script src="../scripts/json2.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var queryStrings = $.QueryString();
            $.ajax({
                type: "POST",
                url: "RelatorioArtigo.aspx/getArtigos",
                contentType: "application/json; charset=utf-8",
                data: JSON.stringify({ idEvento: queryStrings.i }),
                dataType: "json",
                success:
					    function (msg) {
					        var item = msg.d;
					        var artigos = "";
					        artigos += "<div><div style='text-align: center'><img src='../Imagens/logo-ulbra.png' alt='logo'/></div>";
					        artigos += "<div style='border: 1px solid black;'><center><h2>" + item[0].Evento.titulo + "</h2></center></div><br/>";
					        artigos += "<div style='border: 1px solid black;'><center><h2>Artigos</h2></center><table><tr><td style='text-align:center'>Título</td><td style='text-align:center'>Aprovado ?</td></tr>";
					        for (i = 0; i < item.length; i++) {
					            artigos += "<tr><td>" + item[i].titulo + "</td>";
					            if (item[i].aprovado == true)
					                artigos += "<td>Sim</td></tr>";
					            else
					                artigos += "<td>Não</td></tr>";
					        }
					        artigos += "</table></div>";
					        document.getElementById('artigos').innerHTML = artigos;
					    }
            });
        });
    </script>
    <style type="text/css">
        table
        {
            width: 649px;
            border-collapse: collapse;
        }
        table, th, td
        {
            border: 1px solid black;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="conteudo" style="margin-bottom: auto; margin-top: auto; margin-left: auto;
            margin-right: auto; width: 650px">
        </div>
        <br />
        <div id="artigos" style="margin-bottom: auto; margin-top: auto; margin-left: auto;
            margin-right: auto; width: 650px">
        </div>
        <br />
        <div id="eventos" style="margin-bottom: auto; margin-top: auto; margin-left: auto;
            margin-right: auto; width: 650px">
        </div>
    </div>
    </form>
</body>
</html>
